@page
@{ Layout = "_Layout"; }

<el-form v-on:submit.native.prevent ref="form" :model="form" size="small" status-icon label-width="220px">
  <el-form-item label="站点">
    {{ siteName }}
  </el-form-item>
  <el-form-item v-if="root" label="站点文件夹名称" prop="siteDir" :rules="{ required: true, message: '请输入站点文件夹名称' }">
    <el-input v-model="form.siteDir"></el-input>
    <small class="tips">实际在服务器中保存此网站的文件夹名称，此路径必须以英文或拼音命名</small>
  </el-form-item>
  <el-form-item v-if="root" label="需要转移的文件夹" prop="checkedDirectories">
    <el-checkbox style="margin-left: 5px" v-model="checkAllDirectories" v-on:change="handleCheckAllDirectoriesChange">全选</el-checkbox>
    <div></div>
    <el-checkbox-group v-model="form.checkedDirectories">
      <el-checkbox v-for="dir in directories" :label="dir" :key="dir" v-on:change="handleCheckedDirectoriesChange">{{dir}}</el-checkbox>
    </el-checkbox-group>
  </el-form-item>
  <el-form-item v-if="root" label="需要转移的文件" prop="checkedFiles">
    <el-checkbox style="margin-left: 5px" v-model="checkAllFiles" v-on:change="handleCheckAllFilesChange">全选</el-checkbox>
    <div></div>
    <el-checkbox-group v-model="form.checkedFiles">
      <el-checkbox v-for="file in files" :label="file" :key="file" v-on:change="handleCheckedFilesChange">{{file}}</el-checkbox>
    </el-checkbox-group>
  </el-form-item>
  <el-form-item v-if="!root" label="转移文件夹及文件">
    <el-radio-group v-model="form.isMoveFiles">
      <el-radio :label="true">转移</el-radio>
      <el-radio :label="false">不转移</el-radio>
    </el-radio-group>
    <div>
      <small class="tips">选择转移将把此站点内的文件夹及文件转移到系统根目录</small>
    </div>
  </el-form-item>
</el-form>

<el-divider></el-divider>
<div style="height: 10px"></div>

<el-row>
  <el-col :span="24" align="center">
    <el-button type="primary" v-on:click="btnSubmitClick" size="small">{{ pageTitle }}</el-button>
  </el-col>
</el-row>

@section Scripts{
<script src="/sitefiles/assets/js/admin/settings/sitesChangeRoot.js" type="text/javascript"></script> }